package com.mall.server.controller;

import com.mall.commons.R;
import com.mall.server.service.MemberLevelService;
import com.tanhua.model.domain.UmsMemberLevel;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/memberLevel")
public class MemberLevelController {

    @Autowired
    private MemberLevelService memberLevelService;


    /**
     * 查询所有会员等级
     * @param umsMemberLevel
     * @return
     */
    @GetMapping("/list")
    public R list(UmsMemberLevel umsMemberLevel){

        List<UmsMemberLevel> umsMemberLevels =memberLevelService.list(umsMemberLevel);

        return R.success(umsMemberLevels);
    }



}




